var t = require("../../../utils/themeSkin/skinBehavior"), a = getApp();

Page({
    behaviors: [ t ],
    data: {
        dy_password: "",
        show: !1,
        details: {},
        type: "",
        popup_info: {},
        language: ""
    },
    onLoad: function() {
        var t = wx.getStorageSync("tiktok_detail"), a = wx.getStorageSync("langIndex");
        this.setData({
            language: a.en,
            details: t
        });
    },
    onClickHide: function() {
        this.setData({
            show: !1
        });
    },
    code_link: function() {
        var t = this;
        wx.setClipboardData({
            data: this.data.dy_password,
            success: function() {
                a.tips("口令已复制，打开抖音app下单！"), t.setData({
                    show: !1
                });
            },
            fail: function(t) {
                a.tips("复制失败");
            }
        });
    },
    link: function(t) {
        var n = this, e = t.currentTarget.dataset.type, o = t.currentTarget.dataset.item, i = o.detail_url || o.author_openid, s = {}, r = "";
        "room" == e ? (r = "plugin.tiktok-cps.api.live.tranfer-link", s.openid = i) : (s.detail_url = i, 
        r = "plugin.tiktok-cps.api.goods.tranfer-link"), a._postNetWork({
            url: a.getNetAddresss(r),
            data: s,
            success: function(t) {
                if (0 == t.data.result) return a.tips(t.data.msg);
                n.setData({
                    dy_password: t.data.data.dy_password,
                    type: e,
                    popup_info: o,
                    show: !0
                });
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});